<?php
class IndexController extends BaseController {
	public function  subLogin(){
		$code = ClassManager::getVerificationCode();
		if ($code->boolCode($_POST['code'])==true){
			$adminServer = HttpServerManager::getAdminServer();
			$login =  $adminServer->logion($_POST['name'],$_POST['password']);
			if ($login==true){
				header("Location: admin_home.html");
			}
			else{
				ClassManager::getToos()->msgbox("用户名或密码错误");
			}
		}
		else{
			ClassManager::getToos()->msgbox("验证码错误");
		}
	}
}
?>